<template>
<h2>用户投资项目明细</h2>
<table border="1" table="table-bordered">
    <tr style="background-color: aqua;">
        <td>用户名</td>
        <td>投资金额</td>
        <td>投资时间</td>
    </tr>
    <tr v-for="i in data">
        <td>{{ i.UL_Name }}</td>
        <td>{{ i.UI_Money.toFixed(2) }}CNY</td>
        <td>{{ i.UI_Date.substring(0,10) }}</td>
    </tr>
</table>
</template>
<script setup lang="ts">
import axios from 'axios';
import { ref,onMounted } from 'vue';
import { useRoute } from 'vue-router';
const route = useRoute()
const data:any=ref([])
onMounted(()=>{
    Select()
})
const Select=()=>{
    axios.get('https://localhost:44358/api/Invest/SelectInvestContext',
        {
            params:{
                I_Id:route.query.I_Id
            }
        }
    ).then(res=>{
        data.value=res.data
        console.log(data.value);
    }).catch(err=>{
        console.log(err);
    })
}


</script>